Reindent on save
Sublime Text - reindent on save
Details
Installs
- Total 27K
- Win 18K
- Mac 5K
- Linux 4K
Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | Aug 4 | Aug 3 | Aug 2 | Aug 1 | Jul 31 | Jul 30 | Jul 29 | Jul 28 | Jul 27 | Jul 26 | Jul 25 | Jul 24 | Jul 23 | Jul 22 | Jul 21 | Jul 20 | Jul 19 | Jul 18 | Jul 17 | Jul 16 | Jul 15 | Jul 14 | Jul 13 | Jul 12 | Jul 11 | Jul 10 | Jul 9 | Jul 8 | Jul 7 | Jul 6 | Jul 5 | Jul 4 | Jul 3 | Jul 2 | Jul 1 | Jun 30 | Jun 29 | Jun 28 | Jun 27 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 1 | 0 | 2 | 1 | 1 | 0 | 2 | 4 | 0 | 2 | 2 | 3 | 1 | 0 | 1 | 1 | 1 | 1 | 2 | 2 | 1 | 2 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 2 | 2 | 1 | 0 | 1 | 5 | 1 | 0 | 2 | 1 | 0 | 1 | 0 | 0 | 0 |
Mac | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Sublime Text - reindent on save
This is simple plugin to call reindent each time you save your file.
What you should be aware is that sublime's reindent is not perfect.
You can specify file types which you want to be reindented on save:
"reindent_on_save": ["css", "SCSS", "html", "Js"]
Installation
The recommended installation method is via Package Control. Learn more here: https://sublime.wbond.net/.
How to add configuration option
In your Sublime navigate to Preferences \ Settings - User
Your settings file will be opened.
In fresh installation of Sublime it probably will be something like this:
{
"ignored_packages": ["Vintage"]
}
Or if you have made some changes, they will be saved here, in my case I had something like this:
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"convert_tabspaces_on_save": true,
"default_line_ending": "unix",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_size": 14,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages": ["Vintage"],
"rulers": [80, 120],
"show_encoding": true,
"show_line_endings": true,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"word_wrap": false
}
To add new options, just place comma after last option and add new one, here is what it will look like in fresh installation:
{
"ignored_packages": ["Vintage"],
"reindent_on_save": ["php", "sublime-settings", "json", "html", "css"]
}
That is important to not forget add comma, or sublime will fail saving changes, and show you error message “Error trying to parse settings: Unexpected character, expected a comma”